package com.handydata.antifraud.common.exception;

import com.handydata.common.exception.ExCode;

/**
 * 订单基础信息表异常码枚举类
 * 
 * @author guolong
 * @email jishu@handy-data.cn
 * @date 2019-08-18 20:57:31
 */
public enum OrderBaseInfoExCode implements ExCode{
	
	SUCCESS("0000", "成功"),
	
	BIZ_SYS_ID_CANT_BE_NULL(E.BIZ_EX_PREFIX + "000001", "系统编号不能为空"),
	BIZ_SYS_SEQ_CANT_BE_NULL(E.BIZ_EX_PREFIX + "000002", "请求序列号不能为空"),
	//BIZ_...
	
	SYS_CREATE_ENTITY_ERROR(E.SYS_EX_PREFIX + "1000", "新增记录错误"),
	SYS_NO_ENTITY_CREATED(E.SYS_EX_PREFIX + "1001", "没有记录被新增"),
	SYS_MODIFY_ENTITY_ERROR(E.SYS_EX_PREFIX + "1002", "修改记录错误"),
	SYS_NO_ENTITY_MODIFIED(E.SYS_EX_PREFIX + "1003", "没有记录被修改"),
	SYS_QUERY_ENTITY_ERROR(E.SYS_EX_PREFIX + "1004", "查询记录错误"),
	SYS_DELETE_ENTITY_ERROR(E.SYS_EX_PREFIX + "1005", "删除记录错误"),
	SYS_NO_ENTITY_DELETED(E.SYS_EX_PREFIX + "1006", "没有记录被删除"),
	SYS_MODIFY_ENTITY_EMPTY(E.SYS_EX_PREFIX + "1007", "修改记录不存在"),
	SYS_MODIFY_ENTITY_NOT_UNIQUE(E.SYS_EX_PREFIX + "1008", "修改记录不唯一"),

	SYS_UNKNOWN_ERROR(E.SYS_EX_PREFIX + "9999", "未知系统异常")
	;
    
    public String errorCode;
    public String errorMsg;
    
    private static class E {
    	public static final String SYS_EX_PREFIX = "RISK_ORDER_BASE_INFO_SYS_";
    	public static final String BIZ_EX_PREFIX = "RISK_ORDER_BASE_INFO_BIZ_";
    }
    
    private OrderBaseInfoExCode(String errorCode, String errorMsg){
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

	@Override
	public String getErrorCode() {
		return this.errorCode;
	}

	@Override
	public String getErrorMsg() {
		return this.errorMsg;
	}
}
